import Vue from 'vue';


function padDate(value) {
  return value < 10 ? "0" + value : value;
}

Vue.filter('formatDate' , value=> {
  const date = new Date(value);
  const month = padDate(date.getMonth() + 1);
  const day = padDate(date.getDate());
  const hours = padDate(date.getHours());
  const minutes = padDate(date.getMinutes());
  return `${month}月${day}日 ${hours}:${minutes}`
})